<template>
  <div class="bl-page-view">
    <dv-border-box-1>
      <div class="box">
        <div class="df-ac-jcsb">
          <div class="box-title">最新打卡人员列表</div>
          <dv-decoration-3 style="width:1.25rem;height:.25rem; position:relative;left:-0.5rem;" />
        </div>
        <dv-scroll-board :config="config" class="box-echart" />
      </div>
    </dv-border-box-1>
  </div>
</template>

<script>
export default {
  name: 'BottomLeft',
  data () {
    return {
      config: {}
    }
  },
  props: {
    data: {
      type: Array,
      default: () => []
    }
  },
  watch: {
    data (newV, oldV) {
      this.initChart()
    },
    deep: true
  },
  methods: {
    initChart () {
      const config = {
        header: ['公司', '姓名', '状态'],
        data: this.data,
        rowNum: 5, // 表格行数
        headerHeight: 35,
        headerBGC: '#0f1325', // 表头
        oddRowBGC: '#0f1325', // 奇数行
        evenRowBGC: '#171c33', // 偶数行
        // index: true,
        columnWidth: [200, 100, 120, 100],
        align: ['center'],
        waitTime: 2500,
        carousel: 'page'
      }
      this.config = config
    }
  }
}
</script>

<style lang="scss" scoped>
.bl-page-view {
  padding: 0.25rem;
  height: calc(100% - 0.5rem);
  .box {
    position: relative;
    height: 100%;
    .box-title {
      color: #1bb4f9;
      font-size: 0.225rem;
      padding: 0.25rem 0 0.2rem 0.625rem;
    }
    .box-echart {
      width: 90%;
      height: 3rem;
      margin: 0 auto;
    }
  }
}
</style>
